package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Dao.Daocommodity;
import Dao.impl.Daoimplcommodity;
@WebServlet(name="qbsp_del",urlPatterns="/qbsp_del.do")
public class Hqbsp_del extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		int id = Integer.parseInt(request.getParameter("id"));
		Daocommodity dao = new Daoimplcommodity();
		boolean hao = dao.houdel(id);
		if(hao){
			System.out.println("1");
		}else{
			System.out.println("2");
		}
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}
